package com.yy.cleaner.utils;

import com.yy.cleaner.common.BaseReponse;

/**
 * 响应工具类
 */
public class ReponseUtils {

    /**
     * 请求成功
     * @return
     */
    public static<T> BaseReponse<T> success(T data){
        return new BaseReponse(200,"请求成功",data);
    }

    /**
     * 请求成功(带信息)
     * @return
     */
    public static<T> BaseReponse<T> success(String message, T data){
        return new BaseReponse(200,message,data);
    }

    /**
     * 请求失败  不携带数据
     */
    public static BaseReponse fail(int errCode, String errMessage){
         return new BaseReponse(errCode, errMessage,null);
    }


}
